/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.assignment2.dependenceinvesion;

import za.ac.cput.assignment2.dependenceinvesion.impl.BankAccount;
import za.ac.cput.assignment2.dependenceinvesion.violation.impl.BankAccountImpl;

/**
 *
 * @author yandiswa
 */
public class Bank
{
    SourceInterface source;
    DestinationInterface destination;
    double value;

    public void setSource(SourceInterface source)
    {
        this.source = source;
    }

    public SourceInterface getSource()
    {
        return source;
    }

    public void setDestination(DestinationInterface destination)
    {
        this.destination = destination;
    }

    public DestinationInterface getDestination()
    {
        return destination;
    }

    public void setValue(double value)
    {
        this.value = value;
    }

    public double getValue()
    {
        return value;
    }

    public void Transaction()
    {
        source.removeFunds(value);
        destination.addFunds(value);
    }

   

    

   
}
